package com.fan.exception;

/**
 * 数据摘要校验失败异常
 */
public class DigestVerifyException extends RuntimeException {
    
    private String fieldName;
    private String expectedDigest;
    private String actualDigest;
    
    public DigestVerifyException(String fieldName, String expectedDigest, String actualDigest) {
        super(String.format("字段 [%s] 摘要校验失败！预期: %s, 实际: %s", 
            fieldName, expectedDigest, actualDigest));
        this.fieldName = fieldName;
        this.expectedDigest = expectedDigest;
        this.actualDigest = actualDigest;
    }
    
    public DigestVerifyException(String message) {
        super(message);
    }
    
    // Getters
    public String getFieldName() {
        return fieldName;
    }
    
    public String getExpectedDigest() {
        return expectedDigest;
    }
    
    public String getActualDigest() {
        return actualDigest;
    }
}